package com.wlz.map;

import java.util.HashMap;
import java.util.Map;

/**
 * @author： wlz
 * @Date 2020/7/20 10:56
 * @description： TODO
 * @version: 1.0
 */
public class MapTest {


    public static void main(String[] args) {
        Map map = new HashMap<>();

        map.put("wlz","张三");
        map.put("wlzz","李思");

        for (int i = 1; i < 100; i++) {
            map.put("wlz" + i,"李思" + i);
            System.out.println(hash("wlz" + i));
        }

        System.out.println(map.get("wlz10"));

    }

    static final int hash(Object key) {
        int h;
        return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);
    }

}
